package routefinder;

import java.util.Map;

public interface RouteFinder {
    /**
     * Returns the shortest route length between the start and the end cities.
     * Returns -1 if the end city cannot be reached from the start city.
     */
    public int getShortestRouteLength(City startCity, City endCity);

    /**
     * Returns the shortest route lengths between the start city and all the
     * cities which can be reached from the start city (including the start
     * city)
     */
    Map<City, Integer> getAllShortestRouteLengths(City startCity);

    /**
     * Gets the number of routes from <code>startCity</code> to
     * <code>endCity</code> not exceeding the <code>maximumDistance</code>
     *
     * @param startCity source
     * @param endCity destination
     * @param maximumDistance the maximum distance that the route can have.
     * @return the number of routes that doesn't exceed <code>maximumDistance</code>
     */
    int getRoutesConstrainedDistance(City startCity, City endCity, int maximumDistance);

    /**
     * Gets the number of trips that can be done from startCity to endCity,
     * not exceeding the maximumStops.
     *
     * @param startCity source
     * @param endCity destination
     * @param maximumStops the maximum number of stops in a route.
     * @return the number of trips.
     */
    int getTrips(City startCity, City endCity, int maximumStops);

    /**
     * Gets  the number of trips that can be done from startCity to endCity,
     * with exactly <b>requiredStops</b>.
     *
     * @param startCity source
     * @param endCity destination
     * @param requiredStops the exact number of stops that the route must have.
     * @return the number of trips
     */
    int getTripsStrictStops(City startCity, City endCity, int requiredStops);
}
